package com.peakmain.systemmoudle.adapter;

import android.content.Context;

import com.peakmain.baselibrary.recyclerview.adapter.CommonRecyclerAdapter;
import com.peakmain.baselibrary.recyclerview.adapter.ViewHolder;
import com.peakmain.sysemmoudle.R;
import com.peakmain.wanandroid.netmodule.bean.system.SystemListBean;

import java.util.List;

/**
 * author ：Peakmain
 * createTime：2019/7/13
 * mail:2726449200@qq.com
 * describe：
 */
public class SystemListAdapter extends CommonRecyclerAdapter<SystemListBean.DatasBean> {
    public SystemListAdapter(Context context, List<SystemListBean.DatasBean> data) {
        super(context, data, R.layout.recycler_view_system_list);
    }
    @Override
    public void convert(ViewHolder holder, SystemListBean.DatasBean item) {
      holder.setText(R.id.tv_title,item.getTitle());
      holder.setText(R.id.tv_name,String.format(mContext.getResources().getString(R.string.autor),item.getAuthor()));
      holder.setText(R.id.tv_data,String.format(mContext.getResources().getString(R.string.time),item.getNiceDate()));

    }
}
